package pen_exam.mayi2024_03_30;


/**
 * N个点 M条边 是否能做出无自环无重边简单连通图
 * */
public class Class01_GrapNM {
    public static boolean isEasyGrap(int n,int m){
        if(n <= 1){
            return false;
        }else
        if(n == 2){
            return m == 1;
        }else {
            return m >= n - 1 && m <= n * (n - 1) / 2;
        }

    }
}
